package com.budwk.app.sqfw.models;

import com.budwk.starter.common.openapi.annotation.ApiModel;
import com.budwk.starter.common.openapi.annotation.ApiModelProperty;
import com.budwk.starter.database.model.BaseModel;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.nutz.dao.entity.annotation.*;
import org.nutz.dao.interceptor.annotation.PrevInsert;
import org.nutz.dao.interceptor.annotation.PrevUpdate;

import java.io.Serializable;
import java.util.Date;

@Data
@Table("shequ.sqfw_workorder")
@Comment("工单服务")
@ApiModel(description = "工单服务")
public class Sqfw_workorder implements Serializable {

    private static final long serialVersionUID = 1L;

    @Column
    @Name
    @Comment("id")
    @ApiModelProperty(description = "ID")
    @ColDefine(type = ColType.VARCHAR, width = 50)
    @PrevInsert(uu32 = true)
    private String id;

    @Column("sqfw_id")
    @Comment("服务记录id")
    @ApiModelProperty(description = "ID")
    @ColDefine(type = ColType.VARCHAR, width = 255)
    private String sqfw_id;

    @Column("user_name")
    @Comment("用户名")
    @ApiModelProperty(description = "ID")
    @ColDefine(type = ColType.VARCHAR, width = 255)
    private String user_name;

    @Column("wk_status")
    @Comment("工单状态 新建 处理中 等待用户回复 已解决 关闭")
    @ApiModelProperty(description = "ID")
    @ColDefine(type = ColType.VARCHAR, width = 255)
    private String wk_status;

    @Column("wk_grade")
    @Comment("工单等级")
    @ApiModelProperty(description = "ID")
    @ColDefine(type = ColType.VARCHAR, width = 255)
    private String wk_grade;

    @Column("wk_priority")
    @Comment("优先级")
    @ApiModelProperty(description = "ID")
    @ColDefine(type = ColType.VARCHAR, width = 255)
    private String wk_priority;

    @Column("complete_time")
    @Comment("完成时间")
    @ApiModelProperty(description = "完成时间")
    @ColDefine(type = ColType.TIMESTAMP, width = 8)
    private Date complete_time;

    @Column()
    @Comment("备注")
    @ApiModelProperty(description = "备注")
    @ColDefine(type = ColType.VARCHAR, width = 255)
    private String remark;

    @Column()
    @Comment("user_id")
    @ApiModelProperty(description = "user_id")
    @ColDefine(type = ColType.VARCHAR, width = 50)
    private String user_id;

    @Column("from_user_id")
    @Comment("来自谁")
    @ApiModelProperty(description = "来自谁")
    @ColDefine(type = ColType.VARCHAR, width = 50)
    private String fromUserId;

    @Column("to_user_id")
    @Comment("发给谁")
    @ApiModelProperty(description = "发给谁")
    @ColDefine(type = ColType.VARCHAR, width = 50)
    private String toUserId;

    @Column("createdat")
    @Comment("创建时间")
    @ColDefine(type = ColType.TIMESTAMP)
    private Date createDate;

    @Column
    @Comment("修改时间")
    @ColDefine(type = ColType.TIMESTAMP)
    private Date updatedAt;

    @Column
    @Comment("创建人")
    @ColDefine(type = ColType.VARCHAR, width = 50)
    private String createdBy;

    @Column
    @Comment("修改人")
    @ColDefine(type = ColType.VARCHAR, width = 50)
    private String updatedBy;

    @Column
    @Comment("删除标志")
    private Boolean delflag;

    @Column("popo_mid")
    @Comment("泡泡消息id")
    @ColDefine(type = ColType.VARCHAR, width = 50)
    private String popoMid;

    @Column("latest_flow_remark")
    @ColDefine(type = ColType.VARCHAR, width = 500)
    @Schema(description = "最新工作流备注")
    private String latestFlowRemark;

    @Column("flow_start_time")
    @Comment("修改时间")
    @ColDefine(type = ColType.TIMESTAMP)
    private Date flowStartTime;

    @Column("service_type")
    @Comment("任务类型")
    @ColDefine(type = ColType.VARCHAR, width = 255)
    private String serviceType;

    // 社区后台查询新增字段
    private String community;
}